﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace WindowsFormsApplication2
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            WynikZapytania r;
            BazaDaych.Inicjalizacja();
            string[] gw = { "*" };
            r = BazaDaych.WykonajZWynikiem(Zapytanie.Select("parafie", null, gw));
           if (r.wersy < 2) new DodajParafie().ShowDialog();

        }

        private void button1_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2("ludzie", button1.Text);
            f2.Show();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2("chrzty", button2.Text);
            f2.Show();
        }

        private void button3_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2("sluby", button3.Text);
            f2.Show();
        }

        private void button4_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2("zgony", button4.Text);
            f2.Show();
        }

        private void button5_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2("akty", button5.Text);
            f2.Show();
        }

        private void button6_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2("ludziewszyscy", button5.Text);
            f2.Show();
        }

        private void button7_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2("ksieza", button5.Text);
            f2.Show();
        }

        private void button8_Click(object sender, EventArgs e)
        {
            Form2 f2 = new Form2("parafie", button5.Text);
            f2.Show();
        }
    }
}
